<?php
namespace App\Library\System\Model;

use App\Library\System\Model;

/**
 * Skill Model
 *
 * @category   Model
 * @package    App\Library\System\Model
 * @author     Nam Vo <vhnam@peslook.com>
 * @copyright  Peslook
 * @version    1.0
 * @since      Class available since Release 1.0
 */
class CountryModel extends Model
{
    /**
     * Constructor
     *
     * @param string|int $id
     */
    public function __construct($id = null)
    {
        parent::__construct();
    }

    public function getAllCountries()
    {
        return $this->more($this->select()
                                ->columns(array(
                                    'id',
                                    'name'
                                ))
                                ->from('country')
        )->toArray();
    }

    public function getAllRegions()
    {
        return $this->more($this->select()
                                ->columns(array(
                                    'id',
                                    'name'
                                ))
                                ->from('region')
        )->toArray();
    }
}